package com.ilovetolearn.model
{
	import com.adobe.cairngorm.CairngormError;
	import com.adobe.cairngorm.CairngormMessageCodes;
	import com.adobe.cairngorm.model.IModelLocator;
	import com.ilovetolearn.vo.CourseVo;
	import com.ilovetolearn.vo.SentenceVo;
	import com.ilovetolearn.vo.UserVo;

	import mx.collections.ArrayCollection;

	[Bindable]
	public class ModelLocator implements IModelLocator
	{

		private static var _instance:ModelLocator;

		public function ModelLocator(enforcer:ModelSingletonEnforcer)
		{
			if (enforcer == null)
				throw new CairngormError(CairngormMessageCodes.SINGLETON_EXCEPTION, "ModelLocator");
		}

		public static function getInstance():ModelLocator
		{
			if (!_instance)
				_instance=new ModelLocator(new ModelSingletonEnforcer());

			return _instance;
		}
		public var site:String="http://www.ilovetolearn.com.cn/";

		public var InitServiceURL:String=site + "learn.php";

		public var SentenceServiceURL:String=site + "learn.php";

		public var user:UserVo; //用户信息
		public var course:CourseVo; //课程信息
		public var sentenceAc:ArrayCollection; //语句列表
		public var curState:String=""; //当前视图状态
		public var curStudySentence:SentenceVo; //当前测试语句
		public var curStudyIndex:Number=0;
		public var curHitCount:Number=3;
		public var curCheckResult:Boolean=false;

//		public var blankword:Array; //提示单词
//		public var blankwordnumber:Array; //提示单词在测试语句中的位置
	}
}

class ModelSingletonEnforcer
{

}